<template>
    <div>
        <div>
            <van-collapse v-model="activeNames">
                <van-collapse-item name="1" icon="coupon-o">
                    <template #title>
                        <div>基本信息</div>
                    </template>
                    <template>
                        <van-field label-width="70" class="input_text" v-model="data.OrgName" label="部门" placeholder="请选择" required @click-input="userOrgChooseDialogShow = true">
                            <template #button>
                                <van-icon name="cross" @click="clearOrgCode" />
                            </template>
                        </van-field>
                        <van-cell title-style="width:70px;" title="天气情况" id="divWeather" required>
                            <van-radio-group v-model="data.Weather" direction="horizontal">
                                <van-radio v-for="item in weatherList" v-bind:name="item.ID" v-bind:key="item.ID">{{ item.Name }}</van-radio>
                            </van-radio-group>
                        </van-cell>
                        <date-picker label="日期" label-width="70" required v-bind:date.sync="data.MettingDate"></date-picker>
                        <van-row>
                            <van-col span="24">
                                <div>
                                    <van-field label-width="70" v-model="data.Monitor" label="班长" required placeholder="请输入" type="textarea" rows="1" :autosize="true">
                                    </van-field>
                                </div>
                                <span style="float: left; color: #00c1de; margin-left: 100px" @click="userChooseDialogShow1 = true">请输入或选择</span>
                            </van-col>
                        </van-row>
                        <van-row>
                            <van-col span="24">
                                <div>
                                    <van-field label-width="70" v-model="data.DutyOfficer" label="轮值安全员" required placeholder="请输入" type="textarea" rows="1" :autosize="true"></van-field>
                                </div>
                                <span style="float: left; color: #00c1de; margin-left: 100px" @click="userChooseDialogShow2 = true">请输入或选择</span>
                            </van-col>
                        </van-row>
                        <van-cell title="班次" id="divFrequency" required>
                            <van-radio-group v-model="data.Frequency" direction="horizontal">
                                <van-radio v-for="item in frequencyList" v-bind:name="item.ID" v-bind:key="item.ID">{{ item.Name }}</van-radio>
                            </van-radio-group>
                        </van-cell>
                    </template>
                </van-collapse-item>
                <van-collapse-item title="作业风险分析" name="2" icon="cluster-o">
                    <template>
                        <div id="divRisk">
                            <van-checkbox-group direction="horizontal" v-model="result" shape="square" @change="changeRisk()">
                                <van-checkbox v-bind:name="item.RiskType" v-for="item in riskList" v-bind:key="item.RiskType">{{ item.RiskTypeName }}</van-checkbox>
                            </van-checkbox-group>
                        </div>
                        <div>
                            <div v-for="(item, index) in data.Details" v-bind:key="index">
                                <van-field v-bind:id="item.RiskType" required label-width="70" v-bind:label="item.RiskTypeName" v-model="item.Description">
                                </van-field>
                            </div>
                        </div>
                    </template>
                </van-collapse-item>
                <van-collapse-item title="培训内容" name="4" icon="cluster-o">
                    <template>
                        <eagle-checkgroup v-model="TrainingContent" :dataSource="data.TrainingContentList" :option="{label:'Name',value:'ID'}" direction="horizontal" @change="TrainingContentChange" class="input_text"></eagle-checkgroup>
                    </template>
                </van-collapse-item>
                <van-collapse-item title="其他注意事项" name="3" icon="info-o">
                    <template>
                        <div id="divDescription">
                            <div v-for="(item1, index1) in data.Details2" v-bind:key="index1">
                                <van-row>
                                    <van-col span="18">
                                        <van-row>
                                            <van-col span="24">
                                                <van-field v-model="item1.Description" placeholder="请输入其他注意事项" :label="index1 + 1" label-width="10" />
                                            </van-col>
                                        </van-row>
                                        <van-row>
                                            <van-col span="24">
                                                <van-field class="input_text ml-20" style="margin-bottom: 5px">
                                                    <template #input>
                                                        <eagle-image-uploader :images.sync="item1.Attachs"></eagle-image-uploader>
                                                    </template>
                                                </van-field>
                                            </van-col>
                                        </van-row>
                                    </van-col>
                                    <van-col span="6">
                                        <div style="margin-top: 12px">
                                            <van-button type="info" size="mini" @click="addRow()">增加</van-button>
                                            <van-button type="danger" size="mini" @click="delRow(item1, index)">删除</van-button>
                                        </div>
                                    </van-col>
                                </van-row>
                                <van-divider v-if="index1 < data.Details2.length-1" />
                            </div>
                        </div>
                    </template>
                </van-collapse-item>
                <van-collapse-item title="员工状态" name="5" icon="user-circle-o">
                    <template>
                        <van-row>
                            <van-col span="17">
                                <span style="color: #c03131; padding-left: 10px">*</span>
                                <span style="color: #646566; line-height: 28px">员工有无喝酒</span>
                            </van-col>
                            <van-col span="7">
                                <van-radio-group v-model="data.IsDrinkAlcohol" direction="horizontal" required>
                                    <van-radio v-for="item in whetherFTList" v-bind:name="item.ID" v-bind:key="item.ID">{{ item.Name }}</van-radio>
                                </van-radio-group>
                            </van-col>
                        </van-row>
                        <van-field label="情况描述" v-show="data.IsDrinkAlcohol == 'Y'" v-model="data.AlcoholDescription" type="textarea" required label-width="70">
                        </van-field>
                        <van-field label="处理措施" v-show="data.IsDrinkAlcohol == 'Y'" v-model="data.AlcoholHandle" type="textarea" required label-width="70">
                        </van-field>
                        <van-row>
                            <van-col span="17">
                                <span style="color: #c03131; padding-left: 10px">*</span>
                                <span style="color: #646566; line-height: 28px">员工状态有无不佳</span>
                            </van-col>
                            <van-col span="7">
                                <van-radio-group v-model="data.IsMentality" direction="horizontal" required>
                                    <van-radio v-for="item in whetherFTList" v-bind:name="item.ID" v-bind:key="item.ID">{{ item.Name }}</van-radio>
                                </van-radio-group>
                            </van-col>
                        </van-row>
                        <van-field label="情况描述" v-show="data.IsMentality == 'Y'" v-model="data.MentalityDescription" type="textarea" required label-width="70">
                        </van-field>
                        <van-field label="处理措施" v-show="data.IsMentality == 'Y'" v-model="data.MentalityHandle" type="textarea" required label-width="70">
                        </van-field>
                        <van-row>
                            <van-col span="17">
                                <span style="color: #c03131; padding-left: 10px">*</span>
                                <span style="color: #646566; line-height: 28px">员工劳动防护用品穿戴有无不符合要求</span>
                            </van-col>
                            <van-col span="7">
                                <van-radio-group v-model="data.IsWearStandard" direction="horizontal" required>
                                    <van-radio v-for="item in whetherFTList" v-bind:name="item.ID" v-bind:key="item.ID">{{ item.Name }}</van-radio>
                                </van-radio-group>
                            </van-col>
                        </van-row>
                    </template>
                </van-collapse-item>
                <van-collapse-item title="每日六问" name="6" icon="question-o">
                    <template>
                        <van-row>
                            <van-col span="17">
                                <span style="color: #c03131; padding-left: 10px">*</span>
                                <span style="color: #646566; line-height: 28px">安全生产工作我重视了吗？</span>
                            </van-col>
                            <van-col span="7">
                                <van-radio-group v-model="data.IsSafeJob" direction="horizontal" required>
                                    <van-radio v-for="item in WhetherYNList" v-bind:name="item.ID" v-bind:key="item.ID">{{ item.Name }}</van-radio>
                                </van-radio-group>
                            </van-col>
                        </van-row>
                        <van-row>
                            <van-col span="17">
                                <span style="color: #c03131; padding-left: 10px">*</span>
                                <span style="color: #646566; line-height: 28px">安全责任我履职尽责了吗？</span>
                            </van-col>
                            <van-col span="7">
                                <van-radio-group v-model="data.IsSafeResponsibility" direction="horizontal" required>
                                    <van-radio v-for="item in WhetherYNList" v-bind:name="item.ID" v-bind:key="item.ID">{{ item.Name }}</van-radio>
                                </van-radio-group>
                            </van-col>
                        </van-row>
                        <van-row>
                            <van-col span="17">
                                <span style="color: #c03131; padding-left: 10px">*</span>
                                <span style="color: #646566; line-height: 28px">安全法规制度我遵守了吗？</span>
                            </van-col>
                            <van-col span="7">
                                <van-radio-group v-model="data.IsSafeLaw" direction="horizontal" required>
                                    <van-radio v-for="item in WhetherYNList" v-bind:name="item.ID" v-bind:key="item.ID">{{ item.Name }}</van-radio>
                                </van-radio-group>
                            </van-col>
                        </van-row>
                        <van-row>
                            <van-col span="17">
                                <span style="color: #c03131; padding-left: 10px">*</span>
                                <span style="color: #646566; line-height: 28px">集团领导的要求，我做到了吗？</span>
                            </van-col>
                            <van-col span="7">
                                <van-radio-group v-model="data.IsGroupRequire" direction="horizontal" required>
                                    <van-radio v-for="item in WhetherYNList" v-bind:name="item.ID" v-bind:key="item.ID">{{ item.Name }}</van-radio>
                                </van-radio-group>
                            </van-col>
                        </van-row>
                        <van-row>
                            <van-col span="17">
                                <span style="color: #c03131; padding-left: 10px">*</span>
                                <span style="color: #646566; line-height: 28px">我负责的领域，安全检查和隐患排除到位了吗？</span>
                            </van-col>
                            <van-col span="7">
                                <van-radio-group v-model="data.IsResponsibilityArea" direction="horizontal" required>
                                    <van-radio v-for="item in WhetherYNList" v-bind:name="item.ID" v-bind:key="item.ID">{{ item.Name }}</van-radio>
                                </van-radio-group>
                            </van-col>
                        </van-row>
                        <van-row>
                            <van-col span="17">
                                <span style="color: #c03131; padding-left: 10px">*</span>
                                <span style="color: #646566; line-height: 28px">安全生产事故教训我吸取了吗？</span>
                            </van-col>
                            <van-col span="7">
                                <van-radio-group v-model="data.IsSafeProduction" direction="horizontal" required>
                                    <van-radio v-for="item in WhetherYNList" v-bind:name="item.ID" v-bind:key="item.ID">{{ item.Name }}</van-radio>
                                </van-radio-group>
                            </van-col>
                        </van-row>
                    </template>
                </van-collapse-item>
                <van-collapse-item title="班组成员签名" name="7" icon="notes-o">
                    <template>
                        <van-field class="input_text" style="margin-bottom: 5px" required label="会议现场照片">
                            <template #input>
                                <eagle-image-uploader :images.sync="data.MettingPicture"></eagle-image-uploader>
                            </template>
                        </van-field>

                        <van-field class="input_text" style="margin-bottom: 5px" required label="轮值安全员照片">
                            <template #input>
                                <eagle-image-uploader :images.sync="data.SafePeoplePicture"></eagle-image-uploader>
                            </template>
                        </van-field>

                        <van-checkbox v-model="data.IsAgree"><span class="spanValue">本人已接受上述培训教育并明白其详细内容</span></van-checkbox>
                        <eagle-sing-list label="班组成员签名" :value.sync="data.UserSign"></eagle-sing-list>
                    </template>
                </van-collapse-item>
            </van-collapse>
            <div class="bottom-btns">
                <van-button class="submit-btn" type="primary" @click="buttonSave('1')">
                    保存
                </van-button>
            </div>
        </div>
        <user-choose-dialog title="选择班长" :show.sync="userChooseDialogShow1" :isMulti="true" @callback="userChooseCallback1">
        </user-choose-dialog>

        <user-choose-dialog title="选择轮值安全员" :show.sync="userChooseDialogShow2" :isMulti="true" @callback="userChooseCallback2">
        </user-choose-dialog>

        <user-org-choose-dialog :show.sync="userOrgChooseDialogShow" @callback="userOrgChooseCallback">
        </user-org-choose-dialog>
    </div>
</template>
<script>
//gxPreWorkMettingUpdate
import { CommonAttachUploadBase64 } from "@/api/common";

import EagleSingDiy from "../../../components/eagle-sing-diy.vue";
import {
    gxPreWorkMettingUpdate,
    gxPreWorkMettingAdd,
    gxPreWorkMettingDetail,
    preWorkMettingInitNewEntity,
} from "@/api/gx";

import DatePicker from "../../../components/DatePicker.vue";
import UserChooseDialog from "@/views/components/user/userChooseDialog.vue";
import UserOrgChooseDialog from "@/views/components/department/departmentChooseDialog.vue";
import FileUploadValue from "@/components/Attach/FileUploadValue.vue";
import EagleSingList from "../../../components/eagle-sing-list.vue";

export default {
    components: {
        DatePicker,
        EagleSingDiy,
        UserChooseDialog,
        UserOrgChooseDialog,
        FileUploadValue,
        EagleSingList,
    },
    data() {
        return {
            userChooseDialogShow1: false,
            userChooseDialogShow2: false,
            userChooseDialogShow3: false,
            userOrgChooseDialogShow: false,
            TrainingContent: [],
            showImg: false,
            imagePath: "",
            baseUrl: process.env.VUE_APP_BASE_API,
            id: this.$route.query.IDS,
            TypeName: this.$route.query.TypeName,
            adds: "",
            zIndex: -8,
            isCertificate: true,
            isCertificate2: false,
            stageInfo: "",
            client: {},
            data: {
                IsDrinkAlcohol: "",
                IsMentality: "",
                IsWearStandard: "",
                Details2: [],
                Details: [],
                OrgName: "",
                OrgCode: "",
                attachs: null,
            },
            result: [],
            riskList: [],
            riskList2: [],
            frequencyList: [],
            whetherFTList: [],
            weatherList: [],
            WhetherYNList: [],
            showCalendar: false,
            idx: "",
            show: false,
            showChooseTask: false,
            listUser: [],
            listMonitorUser: [],
            listDutyUser: [],
            showAdvance: false,
            ChooseDangerAreaShow: false,
            dangerTemplateShow: false,
            ItemTypesShow: false,
            filter: {
                id: this.$route.query.id,
                SourceID: 0,
            },
            parentID: null,
            activeNames: ["1"],
            userParams: [
                {
                    Name: "ChnName",
                    dataType: "List",
                    accounted: true,
                    userKind: 0,
                },
            ],
            Details: [],
            DeptmentShow: false,
            OrgName: "不限",
            OrgCode: "",
        };
    },
    created() {
        if (this.filter.id > 0) {
            this.$store.commit("updateTitle", "编辑班前会议");
            this.gxPreWorkMettingDetail();
        } else {
            this.$store.commit("updateTitle", "新增班前会议");
            this.preWorkMettingInitNewEntity();
        }
    },
    methods: {
        clearOrgCode() {
            this.data.OrgCode = null;
            this.data.OrgName = null;
        },
        _initListUser(list) {
            this.listUser = list;
        },
        _initListMonitorUser(list) {
            this.listMonitorUser = list;
        },
        _initListDutyUser(list) {
            this.listDutyUser = list;
        },
        gxPreWorkMettingDetail() {
            gxPreWorkMettingDetail(this.filter).then((res) => {
                this.data = res.data;
                var Details = this.data.Details;
                if (Details != null && Details.length > 0) {
                    for (var i = 0; i < Details.length; i++) {
                        this.result.push(Details[i].RiskType);
                    }
                }
                for (var i = 0; i < this.data.RiskList.length; i++) {
                    this.riskList.push({
                        RiskType: this.data.RiskList[i].ID,
                        RiskTypeName: this.data.RiskList[i].Name,
                        Description: "",
                    });
                }
                var img = this.data.UserSign;
                this.frequencyList = this.data.FrequencyList;
                this.whetherFTList = this.data.WhetherFTList;
                this.weatherList = this.data.WeatherList;
                this.WhetherYNList = this.data.WhetherYNList;
                this.data.OrgCode = this.data.OrgCode;
                this.data.OrgName = this.data.OrgName;
                this.TrainingContent = this.data.TrainingContent.split(",");
                // if (this.data.Monitor && !this.data.MonitorChn) {
                //     this.data.MonitorChn = this.data.Monitor;
                // }
                // if (this.data.DutyOfficer && !this.data.DutyOfficerChn) {
                //     this.data.DutyOfficerChn = this.data.DutyOfficer;
                // }
            });
        },
        preWorkMettingInitNewEntity() {
            var vm = this;
            preWorkMettingInitNewEntity(this.parentID).then((res) => {
                //this.data = res.data;
                //this.riskList = this.data.RiskList;
                var tempData = res.data;
                for (var i = 0; i < tempData.RiskList.length; i++) {
                    this.riskList.push({
                        RiskType: tempData.RiskList[i].ID,
                        RiskTypeName: tempData.RiskList[i].Name,
                        Description: "",
                    });
                }
                vm.frequencyList = tempData.FrequencyList;
                vm.whetherFTList = tempData.WhetherFTList;
                vm.weatherList = tempData.WeatherList;
                vm.WhetherYNList = tempData.WhetherYNList;
                vm.data = tempData;
                vm.data.IsDrinkAlcohol = "";
                vm.data.IsMentality = "";
                vm.data.IsWearStandard = "";
                if (this.OrgCode) {
                    this.OrgCode = tempData.OrgCode;
                    this.OrgName = tempData.OrgName;
                } else {
                    this.OrgCode = "";
                    this.OrgName = "不限";
                }
            });
        },
        userChooseCallback1(data) {
            let user = this.common.getCodeAndNames(data, {
                code: "UserName",
                name: "ChnName",
            });
            this.data.Monitor = user.name;
        },
        userChooseCallback2(data) {
            let user = this.common.getCodeAndNames(data, {
                code: "UserName",
                name: "ChnName",
            });
            // this.data.DutyOfficerChn = user.name;
            this.data.DutyOfficer = user.name;
        },
        userChooseCallback3(data) {
            let user = this.common.getCodeAndNames(data, {
                code: "UserName",
                name: "ChnName",
            });
            // this.data.AttendantsChn = user.name;
            this.data.Attendants = user.name;
        },
        dealUserCallback(data) {
            let result = { code: "", name: "" };
            if (data) {
                let codes = [];
                let names = [];
                data.forEach((item, index, arr) => {
                    codes.push(item.UserName);
                    names.push(item.ChnName);
                });
                result.code = codes.join();
                result.name = names.join();
            }
            return result;
        },
        userOrgChooseCallback(data) {
            this.data.OrgCode = data.OrgCode;
            this.data.OrgName = data.OrgName;
        },
        formatDate(date) {
            return `${date.getMonth() + 1}/${date.getDate()}`;
        },
        onConfirm(date) {
            this.show = false;
            this.date = this.formatDate(date);
        },
        addRow() {
            var vm = this;
            var length = vm.data.Details2.length;
            vm.data.Details2.push({ Description: "", Order: length + 1 });
        },
        delRow(item, index) {
            var vm = this;
            if (vm.data.Details2.length == 1) {
                return this.$toast("至少保存一条数据");
            }
            vm.data.Details2.splice(index, 1);
        },
        changeRisk() {
            var vm = this;
            vm.data.Details = [];

            //遍历数据源取到Label
            for (var i = 0; i < vm.result.length; i++) {
                for (var j = 0; j < vm.riskList.length; j++) {
                    if (vm.result[i] == vm.riskList[j].RiskType) {
                        var Description = "";
                        if (document.getElementById(vm.riskList[j].RiskType) != null) {
                            Description = document.getElementById(
                                vm.riskList[j].RiskType
                            ).value;
                        }
                        vm.data.Details.push({
                            RiskType: vm.riskList[j].RiskType,
                            RiskTypeName: vm.riskList[j].RiskTypeName,
                            Description: Description,
                        });
                        continue;
                    }
                }
            }
        },
        buttonSave(isPublish) {
            if (!this.data.OrgCode) {
                return this.$toast("请选择部门");
            }
            if (!this.data.Weather) {
                return this.$toast("请选择天气情况");
            }
            if (!this.data.MettingDate) {
                return this.$toast("请选择日期");
            }
            if (!this.data.Monitor) {
                return this.$toast("请选择或输入班长");
            }
            if (!this.data.DutyOfficer) {
                return this.$toast("请选择或输入轮值安全员");
            }
            if (!this.data.Frequency) {
                return this.$toast("请选择班次");
            }
            if (this.data.Details == null || this.data.Details.length == 0) {
                return this.$toast("请选择作业风险分析");
            }
            for (var i = 0; i < this.data.Details.length; i++) {
                if (!this.data.Details[i].Description) {
                    return this.$toast(
                        "请输入【" + this.data.Details[i].RiskTypeName + "】的描述"
                    );
                }
            }
            // if (!this.data.Attendants) {
            //     return this.$toast("请选择出勤员工");
            // }
            if (!this.data.TrainingContent) {
                return this.$toast("请选择培训内容");
            }
            if (!this.data.IsDrinkAlcohol) {
                return this.$toast("请选择员工有无喝酒");
            }
            if (!this.data.IsMentality) {
                return this.$toast("请选择员工状态有无不佳");
            }
            if (!this.data.IsSafeJob) {
                return this.$toast("请选择安全生产工作我重视了吗？");
            }
            if (!this.data.IsSafeResponsibility) {
                return this.$toast("安全责任我履职尽责了吗？");
            }
            if (!this.data.IsSafeLaw) {
                return this.$toast("安全法规制度我遵守了吗？");
            }
            if (!this.data.IsGroupRequire) {
                return this.$toast("集团领导的要求，我做到了吗？");
            }
            if (!this.data.IsResponsibilityArea) {
                return this.$toast("我负责的领域，安全检查和隐患排除到位了吗？");
            }
            if (!this.data.IsSafeProduction) {
                return this.$toast("安全生产事故教训我吸取了吗？");
            }
            if (!this.data.MettingPicture) {
                return this.$toast("请选择会议现场照片");
            }
            if (!this.data.SafePeoplePicture) {
                return this.$toast("请选择轮值安全员照片");
            }
            if (!this.data.UserSign) {
                return this.$toast("请完善班组成员签名");
            }
            this.loading = true;
            let param = {
                ID: this.data.ID,
                IsPublish: isPublish == "1" ? true : false,
                Weather: this.data.Weather,
                MettingDate: this.data.MettingDate,
                DutyOfficer: this.data.DutyOfficer,
                Monitor: this.data.Monitor,
                Frequency: this.data.Frequency,
                Attendants: this.data.Attendants,
                IsDrinkAlcohol: this.data.IsDrinkAlcohol,
                AlcoholDescription: this.data.AlcoholDescription,
                AlcoholHandle: this.data.AlcoholHandle,
                IsMentality: this.data.IsMentality,
                MentalityDescription: this.data.MentalityDescription,
                MentalityHandle: this.data.MentalityHandle,
                MettingPicture: this.data.MettingPicture,
                SafePeoplePicture: this.data.SafePeoplePicture,
                IsWearStandard: this.data.IsWearStandard,
                IsAgree: this.data.IsAgree ? 1 : 0,
                UserSign: this.data.UserSign,
                Details: this.data.Details,
                Details2: this.data.Details2,
                OrgCode: this.data.OrgCode,
                OrgName: this.data.OrgName,
                IsSafeJob: this.data.IsSafeJob,
                IsSafeResponsibility: this.data.IsSafeResponsibility,
                IsSafeLaw: this.data.IsSafeLaw,
                IsGroupRequire: this.data.IsGroupRequire,
                IsResponsibilityArea: this.data.IsResponsibilityArea,
                IsSafeProduction: this.data.IsSafeProduction,
                TrainingContent: this.data.TrainingContent,
            };

            if (this.data.ID) {
                gxPreWorkMettingUpdate(param, isPublish)
                    .then((res) => {
                        this.$toast("保存成功");
                        this.loading = false;
                        this.$router.goRefresh();
                    })
                    .catch((err) => {
                        console.log("err", err);
                    });
            } else {
                gxPreWorkMettingAdd(param, isPublish)
                    .then((res) => {
                        this.$toast("保存成功");
                        this.loading = false;
                        this.$router.goRefresh();
                    })
                    .catch((err) => {
                        console.log("err", err);
                    });
            }
        },
        _fileUploadCb(attachs, item) {
            console.log(attachs);
            console.log(item);
            var vm = this;
            //this.form.Attach = attachs;
            vm.attachs = attachs;

            vm.fileOperate();
        },
        fileOperate() {
            var vm = this;
            if (vm.attachs != null) {
                for (var i = 0; i < vm.Details2.length; i++) { }
                vm.attachs = null;
            }
        },
        TrainingContentChange() {
            ;
            this.data.TrainingContent = this.TrainingContent.join();
        },
    },
};
</script>
<style lang="less" scoped>
.imgCanvas {
    /* background-color: #71b900; */
    border: 1px solid #7d7d7d;
    width: 50px;
    height: 50px;
}
.imageShow {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}
.van-image {
    background: #fff !important;
}
.bottom-btns {
    margin-top: 10px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    .submit-btn {
        width: 98%;
        height: 35px;
        font-size: 14px;
    }
}

#divFrequency {
    margin-bottom: -20px;
}
#divFrequency .van-cell__value {
    min-width: 75%;
}
#divWeather .van-cell__value {
    min-width: 75%;
}
#divDepart .van-cell__value {
    min-width: 75%;
}
.van-radio {
    margin-top: 3px;
    margin-bottom: 3px;
}

#divDescription .van-collapse-item__content {
    padding-left: 0px;
}

.risk_item_radio {
    width: 100%;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    // border-bottom: 1px solid #e8f1f8;
}

.dep_item {
    width: 100%;
    padding: 10px;
    background-color: #e8f1f8;
    color: #666;
}
.dep_item_detail {
    /* margin: 10px;*/
    padding: 10px;
    border-radius: 5px;
    background-color: #ffffff;
    position: relative;
    margin-bottom: 10px;
    padding-bottom: 0px;
    /* border-bottom: 1px solid #e8f1f8;*/
    .dep_name {
        font-size: 16px;
        color: #000;
    }
    .dep_sort {
        display: flex;
        align-items: center;
        margin-bottom: 10px;
        img {
            height: 15px;
            width: 15px;
            margin-right: 5px;
        }
    }

    .dep_btm {
        display: flex;
        justify-content: flex-end;
        line-height: 27px;
        .btm_item {
            display: flex;
            align-items: center;
            img {
                height: 15px;
                width: 15px;
                margin-right: 5px;
            }
        }
    }
}
</style>